<?php 
	$this->jQuery()
	    ->addJavascriptFile('/js/formulaire.js')
		->addStylesheet($this->baseUrl('/css/formulaire.css'))
	    ->addOnLoad("
            $('#ressource').on('change', function(){
	            $.ajax({
                    url: '" . $this->smartUrl("recuperation-action-par-ressource", "ajax", "back") . "',
	                data: {
	                    ressource: $(this).val()
                    },
	                dataType: 'json',
	                success: function(data){
	                    var options = '<option value=\"\"></option>';
	                    for( indice in data.actions ) {
	                        options += '<option value=\"' + data.actions[indice].value + '\">' + data.actions[indice].display + '</option>';
	                    }
	                    $('#action').html(options);
	                }
                });
	        })
	    ");
	echo $this->render("utilisateurs/actions/editer.phtml");
?>
<div id="entire">
	<div class="tit_bot">
    	<div class="tit">
			<h1><span class="tit_span"><?php echo $this->miettes(" - ")?>&nbsp;</span></h1>
	    </div>
      	<div class="text">
      		Affichage de mon autorisation <br />
      		<?php echo $this->form; ?>
   	  	</div>
	</div>
</div>	
<?php echo $this->render("utilisateurs/actions/editer.phtml");?>
